package com.nami.message.app.convertor;

import com.nami.message.domain.model.gmsg.GrpMsgDomain;
import com.nami.message.facade.grpmsg.request.GrpMsgAddCmd;

public class GrpCmd2DomainConvertor {

    public static GrpMsgDomain toDomain(GrpMsgAddCmd cmd) {

        GrpMsgDomain grpMsgDomain = new GrpMsgDomain();

        grpMsgDomain.setAppKey(cmd.getAppKey());
        grpMsgDomain.setPayload(cmd.getPayload());
        grpMsgDomain.setSeq(cmd.getSeq());
        grpMsgDomain.setPayloadType(cmd.getPayloadType());
        grpMsgDomain.setCid(cmd.getCid());
        grpMsgDomain.setMessageId(cmd.getMessageId());
        grpMsgDomain.setReceiverCount(cmd.getReceiverCount());
        grpMsgDomain.setReceiverIds(cmd.getReceiverIds());
        grpMsgDomain.setSenderId(cmd.getSenderId());

        grpMsgDomain.setSendTime(cmd.getSendTime());
        return grpMsgDomain;
    }
}
